home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
051-060
/
amok56
/
m2maker
/
txt
/
initintuition.mod
< prev
next >
Wrap
Text File
|
1993-11-04
|
22KB
|
443 lines
(*---------------------------------------------------------------------------
:Program. m2Maker
:Author. Thomas Stolze
:Address. Goslarsche Str. 32, 3000 Hannover 21, Germany
:Phone. (0)511 / 75 10 77
:Version. V2.0
:Date. 07-Nov-90
:Copyright. Shareware
:Language. Modula-2
:Translator. M2Amiga V3.32d
:Contents. Programming Utility.
:Remark. Supports the M2Amiga System (C) by A+L AG Switzerland
---------------------------------------------------------------------------*)
IMPLEMENTATION MODULE InitIntuition;
FROM Arts IMPORT Assert,wbStarted;
FROM ExecL IMPORT Forbid,Permit;
FROM FileRequester IMPORT FileRequester,FileRequestFlags,FileRequestFlagSet,
Frame;
FROM GadgetImage IMPORT GadgetImage;
FROM GraphicsD IMPORT DrawModeSet,jam2,RastPortPtr;
FROM GraphicsL IMPORT Move,RectFill,SetAPen,SetBPen,SetDrMd,Text;
FROM IntuitionD IMPORT ActivationFlags,ActivationFlagSet,
boolGadget,BorderPtr,
GadgetFlags,GadgetFlagSet,IDCMPFlags,
IDCMPFlagSet,Image,IntuiTextPtr,MenuItemFlags,
MenuItemFlagSet,NewWindow,
ScreenFlags,
ScreenFlagSet,strGadget,WindowFlags,
WindowFlagSet;
FROM IntuitionL IMPORT AddGadget,AddGList,ClearMenuStrip,
OpenWindow,RefreshGadgets,RefreshGList,
SetMenuStrip,CloseWindow;
FROM IntuitionSupport IMPORT SetBorder,SetBorderKoord,SetGadget,SetImage,
SetInfo,SetIText,SetMenu,SetMenuItem,SetWindow;
FROM SYSTEM IMPORT ADR;
FROM String IMPORT Copy,Length;
CONST gadgetFlags = GadgetFlagSet{};
actions = ActivationFlagSet{gadgImmediate,relVerify};
VAR dummy : ARRAY [0..3],[0..150] OF CHAR;
prg : PRG;
image : Image;
PROCEDURE Print(text : ARRAY OF CHAR;
rport : RastPortPtr;
fPen,bPen : INTEGER;
drawM : DrawModeSet;
xpos,ypos : INTEGER);
BEGIN
Forbid();
SetAPen(rport,fPen); SetBPen(rport,bPen); SetDrMd(rport,drawM);
Move(rport,xpos,ypos); Text(rport,ADR(text),Length(text));
Permit();
END Print;
PROCEDURE PrintStatus(str : ARRAY OF CHAR);
VAR print : ARRAY [0..28] OF CHAR;
i : INTEGER;
BEGIN
Copy(print,str);
FOR i:=Length(print) TO 28 DO print[i]:=" " END; print[28]:=00C;
Print(print,prg.window^.rPort,1,0,jam2,72,138);
END PrintStatus;
PROCEDURE Block(rport : RastPortPtr; col,x1,y1,x2,y2 : INTEGER);
BEGIN
SetAPen(rport,col); SetDrMd(rport,jam2); RectFill(rport,x1,y1,x2,y2);
END Block;
PROCEDURE PrintTexte;
BEGIN
Block(prg.window^.rPort,2,12,93,349,127);
Frame(prg.window^.rPort,1,69,130,350,140,1);
Frame(prg.window^.rPort,3,11,92,350,128,2);
Block(prg.window^.rPort,2,12,28,349,62);
Frame(prg.window^.rPort,3,11,27,350,63,2);
Print("Filename:",prg.window^.rPort,1,2,jam2,23,41);
Print("Linkname:",prg.window^.rPort,1,2,jam2,23,56);
Print("Status:",prg.window^.rPort,3,0,jam2,11,138);
Print("Backup-Path:",prg.window^.rPort,1,2,jam2,21,105);
Print("Project:",prg.window^.rPort,1,2,jam2,21,121);
END PrintTexte;
PROCEDURE RefreshDrawings;
BEGIN
PrintTexte;
RefreshGadgets(prg.window^.firstGadget,prg.window,NIL);
PrintStatus("Window redrawn !");
END RefreshDrawings;
PROCEDURE Initm2Maker;
VAR nw : NewWindow;
i,pos : INTEGER;
PROCEDURE InitITexte;
VAR ptr : IntuiTextPtr;
BEGIN
ptr:=SetIText(prg.TextArray[ 0],ADR("Editor") ,1,0,1,2,jam2);
ptr:=SetIText(prg.TextArray[ 1],ADR("Compiler") ,1,0,1,2,jam2);
ptr:=SetIText(prg.TextArray[ 2],ADR("Linker") ,1,0,1,2,jam2);
ptr:=SetIText(prg.TextArray[ 3],ADR("Run") ,1,0,5,2,jam2);
ptr:=SetIText(prg.TextArray[ 4],ADR(" New") ,1,2,1,2,jam2);
ptr:=SetIText(prg.TextArray[ 5],ADR("Debug End"),1,0,1,2,jam2);
ptr:=SetIText(prg.TextArray[ 6],ADR("Options") ,1,0,1,2,jam2);
ptr:=SetIText(prg.TextArray[ 7],ADR("Load Opt") ,1,0,1,2,jam2);
ptr:=SetIText(prg.TextArray[ 8],ADR("Save Opt") ,1,0,1,2,jam2);
ptr:=SetIText(prg.TextArray[ 9],ADR("Delete") ,1,0,1,2,jam2);
ptr:=SetIText(prg.TextArray[10],ADR("Save") ,1,0,5,2,jam2);
ptr:=SetIText(prg.TextArray[11],ADR("Link") ,1,2,5,2,jam2);
ptr:=SetIText(prg.TextArray[12],ADR("Print") ,1,0,1,2,jam2);
ptr:=SetIText(prg.TextArray[13],ADR("Project") ,1,0,1,2,jam2);
ptr:=SetIText(prg.TextArray[14],ADR("Module") ,1,0,5,2,jam2);
ptr:=SetIText(prg.TextArray[15],ADR("Rename") ,1,0,1,2,jam2);
ptr:=SetIText(prg.TextArray[16],ADR(" M2Make") ,1,0,5,2,jam2);
ptr:=SetIText(prg.TextArray[17],ADR("Make") ,1,0,1,2,jam2);
END InitITexte;
PROCEDURE InitInfo;
BEGIN
SetInfo(prg.InfoArray[0],ADR(prg.BufferString[0]),ADR(dummy[0]),0,149,0);
SetInfo(prg.InfoArray[1],ADR(prg.BufferString[1]),ADR(dummy[1]),0,149,0);
SetInfo(prg.InfoArray[2],ADR(prg.BufferString[2]),ADR(dummy[2]),0,149,0);
SetInfo(prg.InfoArray[3],ADR(prg.BufferString[3]),ADR(dummy[3]),0,149,0);
SetImage(image,0,0,24,10,2,ADR(GadgetImage),3,3);
END InitInfo;
PROCEDURE InitGadgets;
BEGIN
SetGadget(prg.GadgetArray[0],106,35,176,8,gadgetFlags,
actions,strGadget,ADR(prg.BorderArray[6]),
NIL,ADR(prg.InfoArray[0]),10);
SetGadget(prg.GadgetArray[1],106,50,176,8,gadgetFlags,
actions,strGadget,ADR(prg.BorderArray[8]),
NIL,ADR(prg.InfoArray[1]),11);
SetGadget(prg.GadgetArray[2],126,99,208,8,gadgetFlags,
actions,strGadget,ADR(prg.BorderArray[7]),
NIL,ADR(prg.InfoArray[2]),14);
SetGadget(prg.GadgetArray[3],126,114,208,8,gadgetFlags,
actions,strGadget,ADR(prg.BorderArray[7]),
NIL,ADR(prg.InfoArray[3]),16);
SetGadget(prg.GadgetArray[4],13,14,49,10,gadgetFlags,
actions+ActivationFlagSet{toggleSelect},boolGadget,
ADR(prg.BorderArray[2]),ADR(prg.TextArray[0]),NIL,0);
SetGadget(prg.GadgetArray[5],71,14,66,10,gadgetFlags,
actions+ActivationFlagSet{toggleSelect},boolGadget,
ADR(prg.BorderArray[4]),ADR(prg.TextArray[1]),NIL,1);
SetGadget(prg.GadgetArray[6],146,14,49,10,gadgetFlags,
actions+ActivationFlagSet{toggleSelect},boolGadget,
ADR(prg.BorderArray[2]),ADR(prg.TextArray[2]),NIL,2);
SetGadget(prg.GadgetArray[7],204,14,34,10,gadgetFlags,
actions+ActivationFlagSet{toggleSelect},boolGadget,
ADR(prg.BorderArray[0]),ADR(prg.TextArray[3]),NIL,3);
SetGadget(prg.GadgetArray[8],247,14,34,10,gadgetFlags,
actions+ActivationFlagSet{toggleSelect},boolGadget,
ADR(prg.BorderArray[0]),ADR(prg.TextArray[17]),NIL,4);
SetGadget(prg.GadgetArray[9],160,80,74,10,gadgetFlags,
actions+ActivationFlagSet{},boolGadget,
ADR(prg.BorderArray[5]),ADR(prg.TextArray[5]),NIL,5);
SetGadget(prg.GadgetArray[10],90,67,58,10,gadgetFlags,
actions,boolGadget,
ADR(prg.BorderArray[3]),ADR(prg.TextArray[6]),NIL,6);
SetGadget(prg.GadgetArray[11],12,67,66,10,gadgetFlags,
actions,boolGadget,
ADR(prg.BorderArray[4]),ADR(prg.TextArray[7]),NIL,7);
SetGadget(prg.GadgetArray[12],12,80,66,10,gadgetFlags,
actions,boolGadget,
ADR(prg.BorderArray[4]),ADR(prg.TextArray[8]),NIL,8);
SetGadget(prg.GadgetArray[13],246,80,42,10,gadgetFlags,
actions+ActivationFlagSet{toggleSelect},boolGadget,
ADR(prg.BorderArray[1]),ADR(prg.TextArray[10]),NIL,9);
SetGadget(prg.GadgetArray[14],300,49,42,10,gadgetFlags,
actions+ActivationFlagSet{toggleSelect},boolGadget,
ADR(prg.BorderArray[1]),ADR(prg.TextArray[11]),NIL,12);
SetGadget(prg.GadgetArray[15],246,67,42,10,gadgetFlags,
actions+ActivationFlagSet{toggleSelect},boolGadget,
ADR(prg.BorderArray[1]),ADR(prg.TextArray[12]),NIL,13);
SetGadget(prg.GadgetArray[16],290,14,58,10,gadgetFlags,
actions+ActivationFlagSet{toggleSelect},boolGadget,
ADR(prg.BorderArray[3]),ADR(prg.TextArray[13]),NIL,15);
SetGadget(prg.GadgetArray[17],300,67,49,10,gadgetFlags,
actions,boolGadget,
ADR(prg.BorderArray[2]),ADR(prg.TextArray[9]),NIL,17);
SetGadget(prg.GadgetArray[18],300,34,42,10,gadgetFlags,
actions+ActivationFlagSet{toggleSelect},boolGadget,
ADR(prg.BorderArray[1]),ADR(prg.TextArray[4]),NIL,18);
SetGadget(prg.GadgetArray[19],90,80,58,10,gadgetFlags,
actions+ActivationFlagSet{toggleSelect},boolGadget,
ADR(prg.BorderArray[3]),ADR(prg.TextArray[14]),NIL,19);
SetGadget(prg.GadgetArray[20],160,67,74,10,gadgetFlags,
actions+ActivationFlagSet{},boolGadget,
ADR(prg.BorderArray[5]),ADR(prg.TextArray[16]),NIL,20);
SetGadget(prg.GadgetArray[21],300,80,49,10,gadgetFlags,
actions,boolGadget,
ADR(prg.BorderArray[2]),ADR(prg.TextArray[15]),NIL,21);
SetGadget(prg.GadgetArray[22],-76,0,24,10,gadgetFlags+
GadgetFlagSet{gRelRight,gadgImage},actions+
ActivationFlagSet{topBorder},boolGadget,ADR(image),NIL,NIL,22);
END InitGadgets;
PROCEDURE InitBorderKoor;
BEGIN
SetBorderKoord(prg.BorderKoord[0],prg.GadgetArray[7]); (* 4 *)
SetBorderKoord(prg.BorderKoord[1],prg.GadgetArray[13]); (* 5 *)
SetBorderKoord(prg.BorderKoord[2],prg.GadgetArray[4]); (* 6 *)
SetBorderKoord(prg.BorderKoord[3],prg.GadgetArray[10]); (* 7 *)
SetBorderKoord(prg.BorderKoord[4],prg.GadgetArray[5]); (* 8 *)
SetBorderKoord(prg.BorderKoord[5],prg.GadgetArray[20]); (* 9 *)
SetBorderKoord(prg.BorderKoord[6],prg.GadgetArray[0]); (* 20 *)
SetBorderKoord(prg.BorderKoord[7],prg.GadgetArray[2]); (* 30 *)
END InitBorderKoor;
PROCEDURE InitBorder;
VAR ptr : BorderPtr;
BEGIN
ptr:=SetBorder(prg.BorderArray[0],-1,-1,1,0,5,jam2,ADR(prg.BorderKoord[0]));
ptr:=SetBorder(prg.BorderArray[1],-1,-1,1,0,5,jam2,ADR(prg.BorderKoord[1]));
ptr:=SetBorder(prg.BorderArray[2],-1,-1,1,0,5,jam2,ADR(prg.BorderKoord[2]));
ptr:=SetBorder(prg.BorderArray[3],-1,-1,1,0,5,jam2,ADR(prg.BorderKoord[3]));
ptr:=SetBorder(prg.BorderArray[4],-1,-1,1,0,5,jam2,ADR(prg.BorderKoord[4]));
ptr:=SetBorder(prg.BorderArray[5],-1,-1,1,0,5,jam2,ADR(prg.BorderKoord[5]));
ptr:=SetBorder(prg.BorderArray[6],-1,-1,1,2,5,jam2,ADR(prg.BorderKoord[6]));
ptr:=SetBorder(prg.BorderArray[7],-1,-1,1,2,5,jam2,ADR(prg.BorderKoord[7]));
ptr:=SetBorder(prg.BorderArray[8],-1,-1,1,3,5,jam2,ADR(prg.BorderKoord[6]));
END InitBorder;
PROCEDURE InitMenus;
VAR ptr : IntuiTextPtr;
BEGIN
ptr:=SetIText(prg.MenuText[ 0],ADR("Info") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[ 1],ADR("FastLister") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[ 2],ADR("NewShell") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[ 3],ADR("Quit") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[ 4],ADR("Editor F1") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[ 5],ADR("Compiler F2") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[ 6],ADR("Linker F3") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[ 7],ADR("Run F4") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[ 8],ADR("Make F5") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[ 9],ADR("m2Maker") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[10],ADR("edit") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[11],ADR("all") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[12],ADR("from actual") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[13],ADR("User Track II") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[14],ADR("User Track I") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[15],ADR("AutoSave") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[16],ADR("M2Ed Task") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[17],ADR("M2C active") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[18],ADR("Save Project"),0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[19],ADR("all") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[20],ADR("txt") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[21],ADR("Load Project"),0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[22],ADR("Delete Project"),0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[23],ADR("Debug End F7") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[24],ADR("M2Make F6") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[25],ADR("M2C resident") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[26],ADR("M2L resident") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[27],ADR("M2Ed resident") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[28],ADR("M2Pool") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[29],ADR("M2Debug") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[30],ADR("M2Ohm") ,0,1,17,2,jam2);
ptr:=SetIText(prg.MenuText[31],ADR("Touch") ,0,1,17,2,jam2);
prg.menuStripPtr:=SetMenu(prg.menuStrip[0], 28,0,100,0,
ADR(" System"));
prg.menuStrip[0].nextMenu:=SetMenu(prg.menuStrip[1],136,0,100,0,
ADR(" m2Maker"));
prg.menuStrip[1].nextMenu:=SetMenu(prg.menuStrip[2],240,0,100,0,
ADR(" Options"));
prg.menuStrip[2].nextMenu:=SetMenu(prg.menuStrip[3],340,0,100,0,
ADR(" Project"));
prg.menuStripPtr^.firstItem:=SetMenuItem(prg.MenuArray[0],3,0,151,11,
MenuItemFlagSet{commSeq,highComp,itemText,itemEnabled},
ADR(prg.MenuText[0]),NIL,"I");
prg.MenuArray[0].nextItem:=SetMenuItem(prg.MenuArray[1],3,12,151,11,
MenuItemFlagSet{highComp,itemText,itemEnabled,commSeq},
ADR(prg.MenuText[1]),NIL,"F");
prg.MenuArray[1].nextItem:=SetMenuItem(prg.MenuArray[2],3,24,151,11,
MenuItemFlagSet{highComp,itemText,itemEnabled,commSeq},
ADR(prg.MenuText[2]),NIL,"C");
prg.MenuArray[2].nextItem:=SetMenuItem(prg.MenuArray[3],3,36,151,11,
MenuItemFlagSet{commSeq,highComp,itemText,itemEnabled},
ADR(prg.MenuText[3]),NIL,"Q");
prg.menuStrip[1].firstItem:=SetMenuItem(prg.MenuArray[4],3,0,121,11,
MenuItemFlagSet{highComp,itemEnabled,itemText},
ADR(prg.MenuText[4]),NIL,00C);
prg.MenuArray[4].nextItem:=SetMenuItem(prg.MenuArray[5],3,12,121,11,
MenuItemFlagSet{highComp,itemText,itemEnabled},
ADR(prg.MenuText[5]),NIL,00C);
prg.MenuArray[5].nextItem:=SetMenuItem(prg.MenuArray[6],3,24,121,11,
MenuItemFlagSet{highComp,itemText,itemEnabled},
ADR(prg.MenuText[6]),NIL,00C);
prg.MenuArray[6].nextItem:=SetMenuItem(prg.MenuArray[7],3,36,121,11,
MenuItemFlagSet{highComp,itemText,itemEnabled},
ADR(prg.MenuText[7]),NIL,00C);
prg.MenuArray[7].nextItem:=SetMenuItem(prg.MenuArray[8],3,48,121,11,
MenuItemFlagSet{highComp,itemText,itemEnabled},
ADR(prg.MenuText[8]),NIL,00C);
prg.MenuArray[8].nextItem:=SetMenuItem(prg.MenuArray[24],3,60,121,11,
MenuItemFlagSet{highComp,itemText,itemEnabled},
ADR(prg.MenuText[24]),NIL,00C);
prg.MenuArray[24].nextItem:=SetMenuItem(prg.MenuArray[13],3,72,121,11,
MenuItemFlagSet{highComp,itemText,itemEnabled},
ADR(prg.MenuText[23]),NIL,00C);
prg.MenuArray[13].nextItem:=SetMenuItem(prg.MenuArray[14],3,84,121,11,
MenuItemFlagSet{highComp,itemText,itemEnabled},
ADR(prg.MenuText[14]),NIL,00C);
prg.MenuArray[14].nextItem:=SetMenuItem(prg.MenuArray[23],3,96,121,11,
MenuItemFlagSet{highComp,itemText,itemEnabled},
ADR(prg.MenuText[13]),NIL,00C);
prg.MenuArray[23].nextItem:=SetMenuItem(prg.MenuArray[31],3,108,121,11,
MenuItemFlagSet{highComp,itemText},
ADR(prg.MenuText[31]),NIL,00C);
prg.MenuArray[31].nextItem:=SetMenuItem(prg.MenuArray[9],3,120,121,11,
MenuItemFlagSet{highComp,itemText},
ADR(prg.MenuText[9]),NIL,00C);
prg.MenuArray[9].subItem:=SetMenuItem(prg.MenuArray[10],115,3,121,11,
MenuItemFlagSet{highComp,itemText,itemEnabled},
ADR(prg.MenuText[10]),NIL,00C);
prg.MenuArray[10].nextItem:=SetMenuItem(prg.MenuArray[11],115,14,121,11,
MenuItemFlagSet{highComp,itemText,itemEnabled},
ADR(prg.MenuText[11]),NIL,00C);
prg.MenuArray[11].nextItem:=SetMenuItem(prg.MenuArray[12],115,25,121,11,
MenuItemFlagSet{highComp,itemText,itemEnabled},
ADR(prg.MenuText[12]),NIL,00C);
prg.menuStrip[2].firstItem:=SetMenuItem(prg.MenuArray[15],3,0,151,11,
MenuItemFlagSet{highComp,itemText,itemEnabled,commSeq,
menuToggle,checkIt},
ADR(prg.MenuText[15]),NIL,"S");
prg.MenuArray[15].nextItem:=SetMenuItem(prg.MenuArray[16],3,12,151,11,
MenuItemFlagSet{highComp,itemText,itemEnabled,commSeq,
menuToggle,checkIt},
ADR(prg.MenuText[16]),NIL,"E");
prg.MenuArray[16].nextItem:=SetMenuItem(prg.MenuArray[17],3,24,151,11,
MenuItemFlagSet{highComp,itemText,itemEnabled,commSeq,
menuToggle,checkIt},
ADR(prg.MenuText[17]),NIL,"N");
prg.MenuArray[17].nextItem:=SetMenuItem(prg.MenuArray[25],3,36,151,11,
MenuItemFlagSet{highComp,itemText,itemEnabled,
menuToggle,checkIt},
ADR(prg.MenuText[25]),NIL,00C);
prg.MenuArray[25].nextItem:=SetMenuItem(prg.MenuArray[26],3,48,151,11,
MenuItemFlagSet{highComp,itemText,itemEnabled,
menuToggle,checkIt},
ADR(prg.MenuText[26]),NIL,00C);
prg.MenuArray[26].nextItem:=SetMenuItem(prg.MenuArray[27],3,60,151,11,
MenuItemFlagSet{highComp,itemText,itemEnabled,
menuToggle,checkIt},
ADR(prg.MenuText[27]),NIL,00C);
prg.MenuArray[27].nextItem:=SetMenuItem(prg.MenuArray[28],3,72,151,11,
MenuItemFlagSet{highComp,itemText,itemEnabled,
menuToggle,checkIt,commSeq},
ADR(prg.MenuText[28]),NIL,"P");
prg.MenuArray[28].nextItem:=SetMenuItem(prg.MenuArray[29],3,84,151,11,
MenuItemFlagSet{highComp,itemText,itemEnabled,
menuToggle,checkIt,commSeq},
ADR(prg.MenuText[29]),NIL,"K");
prg.MenuArray[29].nextItem:=SetMenuItem(prg.MenuArray[30],3,96,151,11,
MenuItemFlagSet{highComp,itemText,itemEnabled,
menuToggle,checkIt,commSeq},
ADR(prg.MenuText[30]),NIL,"O");
prg.menuStrip[3].firstItem:=SetMenuItem(prg.MenuArray[18],3,0,171,11,
MenuItemFlagSet{highComp,itemText,itemEnabled},
ADR(prg.MenuText[18]),NIL,00C);
prg.MenuArray[18].subItem:=SetMenuItem(prg.MenuArray[19],168,3,110,11,
MenuItemFlagSet{highComp,itemText,itemEnabled,commSeq},
ADR(prg.MenuText[19]),NIL,"A");
prg.MenuArray[19].nextItem:=SetMenuItem(prg.MenuArray[20],168,14,110,11,
MenuItemFlagSet{highComp,itemText,itemEnabled,commSeq},
ADR(prg.MenuText[20]),NIL,"T");
prg.MenuArray[18].nextItem:=SetMenuItem(prg.MenuArray[21],3,12,171,11,
MenuItemFlagSet{highComp,itemText,itemEnabled,commSeq},
ADR(prg.MenuText[21]),NIL,"L");
prg.MenuArray[21].nextItem:=SetMenuItem(prg.MenuArray[22],3,24,171,11,
MenuItemFlagSet{highComp,itemText,itemEnabled,commSeq},
ADR(prg.MenuText[22]),NIL,"D");
END InitMenus;
BEGIN
Assert(wbStarted = FALSE,ADR("Start from CLI"));
InitITexte; InitInfo; InitGadgets; InitMenus; InitBorderKoor; InitBorder;
FOR i:=1 TO 21 DO
prg.GadgetArray[i-1].nextGadget:=ADR(prg.GadgetArray[i]);
END;
SetWindow(nw,0,0,windowWidth,windowHeight,0,1,
IDCMPFlagSet{closeWindow,gadgetUp,gadgetDown,mouseButtons,rawKey,
menuPick,refreshWindow},
WindowFlagSet{windowDrag,windowDepth,windowClose,activate,menuState,
windowRefresh,windowActive,reportMouse},
NIL,NIL,NIL,160,50,windowWidth,
windowHeight,ScreenFlagSet{wbenchScreen});
prg.window:=OpenWindow(nw);
Assert(prg.window # NIL,ADR("Couldn't open Window !"));
Assert(SetMenuStrip(prg.window,prg.menuStripPtr) # FALSE,
ADR("Menu not initialised"));
PrintTexte;
pos:=AddGList(prg.window,ADR(prg.GadgetArray[0]),-1,25,NIL);
pos:=AddGadget(prg.window,ADR(prg.GadgetArray[22]),0);
RefreshGadgets(prg.window^.firstGadget,prg.window,NIL);
WITH prg.FR DO
head := NIL;
x := 354;
y := 0;
displayRows := 8;
displayColumns := 28;
file := "";
dirPath := "";
FRWindow := prg.window;
userWindow := NIL;
userScreen := NIL;
patternStr := "#?";
FRFlags := FileRequestFlagSet{noInfos,pattern,keyCodes,noWindow,
giveFileSelected,giveDirSelected};
func := NIL;
END;
Assert(FileRequester(ADR(prg.FR)),ADR("Error during Startup!"));
END Initm2Maker;
BEGIN
prgPtr:=ADR(prg); Initm2Maker;
CLOSE
IF (prg.window # NIL) THEN
ClearMenuStrip(prg.window); CloseWindow(prg.window); prg.window:=NIL
END;
END InitIntuition.